package com.tledu.spring.service.impl;

import com.tledu.spring.dao.MiMapper;
import com.tledu.spring.domain.Mi;
import com.tledu.spring.service.IMiService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: rupert-tears
 * @Date: Created in 18:47 2021/7/6
 * @Description: 优秀的人都在孤独的翻山越岭！
 */
@Service
@AllArgsConstructor
public class MiServiceImpl implements IMiService {

    private final MiMapper miMapper;

    @Override
    public List<Mi> list() {
        return miMapper.list();
    }

    @Override
    public Integer insert(Mi mi) {
        return miMapper.insert(mi);
    }

    @Override
    public Integer delete(Integer id) {
        return miMapper.delete(id);
    }

    @Override
    public Mi selectById(Integer id) {
        return miMapper.selectById(id);
    }

    @Override
    public List<Mi> selectTo(String id) {
        return miMapper.selectTo(id);
    }

    @Override
    public Integer update(Mi mi) {
       return miMapper.updateTo(mi);
    }
}
